﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace Filmi.NonSemantic
{
    public class DataContainer
    {
        public ImdbReader ImdbReader { get; private set; }
        public List<string> YouTubeSource { get; private set; }

        public DataContainer(string movieName)
        {
            try
            {
                ImdbReader = new ImdbReader(movieName);
                if(ImdbReader != null)
                    if (ImdbReader.Title != null || ImdbReader.Title != "")
                        YouTubeSource = YouTubeTrailerGetter.GetMovieTrailers(ImdbReader.Title);
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc);
                ImdbReader = null;
                YouTubeSource = null;
            }
        }
    }
}
